package com.zhuoyue.biz.core.api.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.zhuoyue.biz.core.api.domain.base.BaseDoClass;
import com.zhuoyue.biz.core.api.dto.req.RoomReqDTO;
import lombok.Data;

/**
 * @author wjming
 * @ClassName: RoomDO
 * @Description: 房间DO层数据
 * @Date 2021-07-02 11:29
 */
@Data
@TableName(value = "`tbl_room`")
public class RoomDO extends BaseDoClass {

    @TableField(value = "`home_id`")
    private String homeId;

    @TableField(value = "`name`")
    private String name;

    @TableField(value = "`img_url`")
    private String imgUrl;

    public RoomDO roomReqDtoToRoomDo(RoomReqDTO roomReqDTO) {
        this.homeId = roomReqDTO.getHomeId();
        this.name = roomReqDTO.getName();
        this.imgUrl = roomReqDTO.getImgUrl();
        return this;
    }

}
